module.exports = {
  publicPath: process.env.NODE_ENV === 'production' ? './' : '/',
  devServer: {
    proxy: {
      '/api': {
        // target: 'http://192.168.41.11:9092/api',//许慧灵
        // target: 'http://www.ywg.cool:8088/api',//自己
        target: 'http://localhost:8088/api',//自己
        changeOrigin: true,//是否跨域
        pathRewrite: {
          '^/api': '/'
        }
      },
      '/user': {
        target: 'http://localhost:8088/user',//用户
        changeOrigin: true,//是否跨域
        pathRewrite: {
          '^/user': '/'
        }
      },
      '/type': {
        target: 'http://localhost:8088/type',//分类
        changeOrigin: true,//是否跨域
        pathRewrite: {
          '^/type': '/'
        }
      },
      '/article': {
        target: 'http://localhost:8088/article',//文章
        changeOrigin: true,//是否跨域
        pathRewrite: {
          '^/article': '/'
        }
      },
    }
  },
};